﻿#ifndef INFOCOURSE_H
#define INFOCOURSE_H
#include <QString>
#include <QStringList>
#include <QStandardItemModel>
class courseInfo
{
public:
    courseInfo();
    //获取选课代码
    QString getCourseSelectId() const;
    //获得课程名称
    QString getCourseName() const;
    //获得课程时间
    QString getCourseTime() const;
    //设置课程信息
    void setCourseInfo(QString courseSelectId,QString courseId,QString courseName,QString courseClass,QString courseCredit,QString courseCharacter,QString courseCollege,QString courseTeacherName,QString courseTeacherLevel,QString courseTime,QString courseAddress,QString courseMaxStudent,QString courseCurrentStudent);
    //把课程显示到tableView中
    void displayThisCourse(QStandardItemModel *model,int curRow) const;
    //学生选课时，人数加一
    void peoplePlusOne();
    //学生退课时，人数减一
    void peopleMinOne();
    //获取课程信息，生成一个QStringList类型的数据
    QStringList getAllInfo() const;
private:
    QString courseSelectId;
    QString courseId;
    QString courseName;
    QString courseClass;
    QString courseCredit;
    QString courseCharacter;
    QString courseCollege;
    QString courseTeacherName;
    QString courseTeacherLevel;
    QString courseTime;
    QString courseAddress;
    QString courseMaxStudent;
    QString courseCurrentStudent;
};


#endif // INFOCOURSE_H
